package com.mall.common.dao.impl;

import org.springframework.stereotype.Repository;

import com.mall.common.dao.ComponentDao;
import com.mall.common.domain.component.ComponentDomain;
import com.mall.common.hibernate.Finder;

/**
 * Dao实现类 - 插件
 */
@Repository
public class ComponentDaoImpl extends BaseDaoImpl<ComponentDomain, Long> implements
		ComponentDao {
	
	@Override
	public ComponentDomain findEnableComponent(Long componentId) {
		String hql = " from ComponentDomain where enableState= '1' and componentId = ?1";
		Finder f = Finder.create(hql);
		return (ComponentDomain)f.findUniqueByHQL();
	}

}
